package com.feicheng.lanniao.service.impl;

import com.feicheng.lanniao.entity.ClientPersonVo;
import com.feicheng.lanniao.mapper.ClientPersonVoMapper;
import com.feicheng.lanniao.result.ResultInfo;
import com.feicheng.lanniao.service.IClientPersonVoService;
import com.feicheng.lanniao.service.IPersonService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * VIEW 服务实现类
 * </p>
 *
 * @author 账号信息视图
 * @since 2021-09-02
 */
@Service
public class ClientPersonVoServiceImpl extends ServiceImpl<ClientPersonVoMapper, ClientPersonVo> implements IClientPersonVoService {
	/**
	 * @see IClientPersonVoService.selectInfo
	 */
	@Override
	public ResultInfo selectInfo(Integer currentPage) {
		//通过视图查询账号 姓名 电话 身份信息
		QueryWrapper<ClientPersonVo> cQueryWrapper = new QueryWrapper<ClientPersonVo>();	
		//判断delect_flag是否为1来展示
		cQueryWrapper.eq("delete_flag", "1");	
		//进行分页操作一页的数据条数为10
		Page<ClientPersonVo> pageInfo = new Page(currentPage,10);	
		//返回查询结果
		return ResultInfo.success(this.page(pageInfo,cQueryWrapper));
	}
}
